# Contributor: Maxim Karasev <mxkrsv@disroot.org>
# Maintainer: Maxim Karasev <mxkrsv@disroot.org>
pkgname=py3-sympy
pkgver=1.12
pkgrel=1
pkgdesc="Computer algebra system written in pure Python"
url="https://www.sympy.org/"
arch="noarch"
license="BSD-3-Clause"
depends="python3 py3-mpmath"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-doc $pkgname-pyc"
source="https://github.com/sympy/sympy/archive/sympy-$pkgver/py3-sympy-$pkgver.tar.gz"
builddir="$srcdir/sympy-sympy-$pkgver"
# the tests get stuck in an infinite loop
options="!check"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl

	find "$pkgdir" -type d -name "tests" -exec rm -r {} +
}

sha512sums="
96a89b88f6912d70c56f5bd1903dd3c518963118ff25d033cdcb7da2f260b8ee209d3ab4a4394dd2b5dc0b4585b71ccd55d55c8e5c6e28024cccbedf07ee4360  py3-sympy-1.12.tar.gz
"
